import { fade } from '@material-ui/core/styles/colorManipulator';
import * as React from 'react';
import {
    Table
} from '@devexpress/dx-react-grid-material-ui';
import { withStyles } from '@material-ui/core/styles';

const styles = theme => ({
    tableStriped: {
        '& tbody tr:nth-of-type(odd)': {
            backgroundColor: fade(theme.palette.primary.main, 0.15),
        },
    },
});
const TableComponentBase = ({ classes, ...restProps }) => (
    <Table.Table
        {...restProps}
        className={classes.tableStriped}
    />
);

const ThemeStriped = withStyles(styles, { name: 'TableComponent' })(TableComponentBase);

export default ThemeStriped